No link module descriptor for automatically generated link modules

When linking 2 formal modules for which there doesn't exist a specific link module, DOORS is capable of creating an automatic link module called "DOORS Links". This link module is placed within the folder of the source module.

In our application we need to export whole link sets. The DXL reference manual states that you can access link sets by means of LinkModuleDescriptors with the

for LinkModuleDescriptor in Folder do

loop. When I do that, i can access all link sets that have been manually created, but for some strange reason I cannot access the automatically generated link set.

The difference seems to be that when DOORS creates a link module automatically, it doesn't seem to create a link set for the source module (at least it doesn't appear in the "Module properties"). Why is this? And why do we have to create link sets for the link module but also for the source module? Looks redundant to me.

Any help highly appreciated. My code looks as follows:
 

Module lnkMod = current;
mPath = path(lnkMod)
mName = name(lnkMod);
Folder f = current
LinkModuleDescriptor l
for l in f do {
  string l_name = getName(l) ""
  if (l_name == mPath "/" mName) {
    string source_mod = getSourceName(l)
    string target_mod = getTargetName(l)
                
    Module mod_s = read(source_mod)
    Module mod_t = read(target_mod)
                        
    string sourceModPath = path mod_s
    string targetModPath = path mod_t
                                        
    Object obj
    for obj in mod_s do {
      Link lnk 
      for lnk in obj -> (mPath "/" mName) do {
        string source_id = identifier(obj)
        Object obj_t = target(lnk)
        string target_id = identifier(obj_t)
        out << source_mod "#" source_id "," target_mod "#" target_id "\n" 
      } 
    }
  }
}

SystemAdmin - Thu Sep 24 09:22:42 EDT 2009

Re: No link module descriptor for automatically generated link modules
llandale - Mon Sep 28 15:27:41 EDT 2009

There is confusion between a
>> LinkSet: an object in a Link Module to which links are associated; and a
>> DefaultLinkModule DLM aka LinkSetPairing LSP aka LinkModuleDescriptor LMD: all of which define which actual LinkSet to use when creating links.

The 'LinkSet' tab in the Module Properties sheet is discussing LSPs, not actual LinkSets. When you insert a target module and link module therein, you are telling DOORS to use that link module when, in the future, links are created. No LinkSet is created at the time, although one may already exist.

The 'for LMD in Folder do' loop looks through the LSPs of modules in the folder.

Your code will only find 'linksets' for which there are LMDs defined in the corresponding source modules. Since it appears to run from an open Link Module, the 'current' folder is the one housing the link module, not the one selected in the Explorer.

It looks to me like you want to select a folder, then open all the modules in the folder and get their outlink going through a specific link module.

  • Louie